package exam.pdd.S3;


import java.util.*;

public class Main {

    public static int k;
    public static char[] a;
    public static char[] b;


    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        k = sc.nextInt();
        sc.nextLine();
        String s = sc.nextLine();
        b = s.toCharArray();
        a = new char[b.length];
        Arrays.fill(a, '2');

        for(int i=0; i<k; ++i) {
            if (b[i] == '1')
                a[i+k] = '1';
            else
                a[i+k] = '0';
        }
        for (int i=b.length-1; i>=b.length-k; --i) {
            if (b[i] == '1')
                a[i-k] = '1';
            else
                a[i-k] = '0';
        }

        for (int i=k; i<b.length-k; ++i) {
            if (b[i] == '0') {
                a[i-k] = '0';
                a[i+k] = '0';
            }
        }

        for (int i=k; i<b.length-k; ++i) {
            if (b[i] == '0')
                continue;
            if (a[i-k] == '2' && a[i+k] == '2') {
                a[i-k] = '0';
                a[i+k] = '1';
            } else if (a[i-k] == '2' && a[i+k] != '2') {
                if (a[i+k] == '0')
                    a[i-k] = '1';
                else
                    a[i-k] = '0';
            } else if (a[i-k] != '2' && a[i+k] == '2') {
                if (a[i-k] == '0')
                    a[i+k] = '1';
                else
                    a[i+k] = '0';
            }
        }

        for (int i=0; i<a.length; ++i) {
            if (a[i] == '2')
                a[i] = '0';
        }

        System.out.println(String.valueOf(a));
    }
}
